'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {

  /*  选择座位 */
  async supervise() {
    // 传递参数
    console.log("传递参数: ", this.ctx.request.body);
    const datas = this.ctx.request.body
    try {
        const data = await this.ctx.service.supervise.supervise(datas.uid, datas.sid, datas.fid);

        this.ctx.body = {
            code: 200,
            data: data,
            msg: "举报成功"
        }
        console.log(data);
    } catch (error) {
        this.ctx.body = {
            code: -1,
            data: error,
            msg: "举报失败"
        }
    }
}
}

module.exports = HomeController;
